<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>积分平台</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/lib/datepicker.min.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/mui/css/mui.min.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/mui/css/mui.picker.min.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/iconfont.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/common.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/newPromotion.css"/>
		<script src="__INDEX__/js/lib/font.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
	    <header class="mui-bar mui-bar-nav">
	        <a class="mui-icon mui-icon-left-nav mui-pull-left goindex" style="color: #ffffff"></a>
	        <h1 class="mui-title">添加招聘信息</h1>
	    </header>
	    <div class="mui-content">
			<form id="forms">
	    	<div class="modular">
				<div class="mui-input-row" >
			        <label>职位名称：</label>
					<select class="mui-select" name="position_id">
						{foreach $data as $value}
						<option value="{$value['id']}">{$value['departmen_name']}/{$value['position_name']}</option>
						{/foreach}
					</select>
				</div>
			</div>
			<div class="modular">
				<div class="mui-input-row" >
			        <label>招聘人数：</label>
			    	<input type="text" name="number"  class="mui-input-clear2" placeholder="0" />
			    	<span class="span-text">人</span>
				</div>
			</div>
			<div class="modular">
				<div class="mui-input-row">
			        <label>积分条件：</label>
			    	<input type="text" name="integral_condition" class="mui-input-clear2" placeholder="0" />
			    	<span class="span-text">分</span>
				</div>
			</div>
			<div class="modular">
				<div class="mui-input-row">
			        <label>结束时间：</label>
			        <input type="text" class="mui-input-clear" name="end_time" id="date2" value="" placeholder="请选择招聘结束时间(必填)" />
			        <span class="mui-icon mui-icon-arrowright"></span>
				</div>
			</div>
			
			<div class="modular">
				<textarea name="explain" class="textCont" placeholder="请填写您的公告内容(500字以内)" ></textarea>
			</div>
			</form>
	    </div>
	    <button class="btn mui-btn mui-btn-block">确定发布</button>
		<script src="__INDEX__/js/lib/zepto.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/lib/datepicker.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/mui/js/mui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/mui/js/mui.view.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/mui/js/mui.picker.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/layer_mobile/layer.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/newPromotion.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/jquery.3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/maowenke.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(".goindex").on('tap',function () {
				window.location.href = "{:url('index/promotionlist')}";
            });
			$(".btn").on('tap',function () {
				ajax($("#forms"),"{:url('add/release')}",function (data) {
					if(data.code==200){
						mui.alert(data.msg);
						setTimeout(function () {
							window.location.href="{:url('/index/index/promotionlist')}";
                        },2000);
					}else{
					    mui.alert(data.msg);
					}
                })
            })
		    
		</script>
	</body>
</html>
